package net.mikoo.seals.model;

public enum TakeStatus {

	WAIT_TAKE(0, "待领取"),
	TAKE_AWAY(1, "已领取"),
	COME_BACK(2, "已归还");
	
	private int value;
	
	private String name;

	private TakeStatus(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public int getValue() {
		return value;
	}

	public String getName() {
		return name;
	}
	
	public static TakeStatus fromStatusValue(Integer value) {
		for(TakeStatus ele : TakeStatus.values()) {
			if(ele.getValue() == value) {
				return ele;
			}
		}
		return null;
	}
	
}
